package com.sugon.modules.device.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sugon.entity.DevFaultPreventMeasure;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 完善维修记录参数VO,用于添加维修记录时业务信息保存
 *
 * @author YuXD
 * @date 2022-09-05
 */
@Data
public class PerfectDevRepairRecordParamVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 设备维修记录ID
     */
    private String id;

    @NotBlank(message = "设备必选")
    private String devId;

    /**
     * 报警分类CCC一级的ID
     */
    private String faultCategoryId;

    /**
     * 设备报警库ID
     */
    private String faultId;

    /**
     * 故障代码：一般为发生故障时由第三方传递过来的代码
     */
    private String faultCode;

    /**
     * 故障描述：一般为发生故障时由第三方传递过来的故障信息
     */
    private String faultDesc;

    @NotBlank(message = "故障描述必填")
    private String recordDescr;

    @NotBlank(message = "原因必填")
    private String reason;

    @NotBlank(message = "解决办法必填")
    private String solution;

    @NotNull(message = "维修结束时间必填")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date repairEndDate;

    @NotNull(message = "维修开始时间必填")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date repairStartDate;

    private String attachment;

    /**
     * 预防措施列表
     */
    private List<DevFaultPreventMeasure> preventMeasureList;

    private String remark;


    /***********************制定预防措施时有可能会传递的参数*****************************/

    private String type;

    /**
     * 停线结束时间：设备维修导致停线时，必填
     */
    private String stoplineEndTime;


}
